mainWindow := NewCWindow(nil, CenterWindow(300, 300), ' ', True, plainDBox, WindowPtr(-1), False, 0); {Create the plain window at the center of the screen.}
setPort(mainWindow); {Set the port to this new window.}
showWindow(mainWindow); {Reveal the window.}
end;
procedure InitializePorts;
begin
DoColorPort(PureBack, 130, 300, 300); {Create a color port with PICT ID 130 of dimensions 300 X 300}
DoColorPort(offLoad, -1, 300, 300); {Create a blank color port of dimensions 300 X 300}
DoColorPort(EyeBall, 128, 19, 179); {Create a color port with PICT ID 128 of dimensions 19 X 179}
DoPort(EyeBallmask, 129, 19, 179); {Create a black and white port with PICT ID 129 of dimensions 19 X 179}
end;
procedure DrawBackGround; {This procedure copies the picture from port PureBack to the MainWindow.}